#include "Borrower_t.h"
typedef string Name;
typedef string ID;

	Borrower_t::Borrower_t(Name name, ID id) : name(name), id(id){
		list_of_books = new list<Book_t*>();
	}

	Borrower_t::~Borrower_t(){
		delete list_of_books;
		return;
	}
	void Borrower_t::borrowBook(Book_t* book_p)
	{
		list_of_books->push_front(book_p);
	}

	void Borrower_t::returnBook(Book_t* book_p)
	{
	/* We use a list of pointer to a book.
	 * For each instance of a book there is a unique ISBN associated with one and only one instacne of Book_t.
	 * Hence, it is sufficient to compare pointer values to find a book
	 */
		list_of_books->remove(book_p);
	}

	const ID Borrower_t::getID() const{
		return id;
	}

	const Name Borrower_t::getName() const{
		return name;
	}
